import { Http } from "../base/http";
import { interForm } from "../base/type";

export class ListSearch extends Http {
    data: any;
    select: any;
    size: string;
    clearable: boolean;
    labels: Map<string, interForm>
    constructor() {
        super()
        this.data = {}
        this.select = {}
        this.labels = new Map()
        this.clearable = true
        this.size = "small"
    }
    getData(props?: string[]) {
        if (props) {
            const keys: { [key: string]: any } = {}
            props.forEach(item => {
                keys[item] = this.data[item]
            })
            return keys
        }
        return { ...this.data }
    }
    async onSearch() {
        throw new Error("未设置查询函数");
    }
} 